package com.jiajia.study;

public class Calculate {

    public Integer add(int a, int b) {
        return a + b ;
    }

    public int subtract(int a,int b){
        return a - b;
    }

    public double divide(int dividend,int divisor){
        if(divisor == 0){
            throw new  IllegalArgumentException("除数不能为0");
        }
        return (double) dividend/divisor;
    }
}
